package com.yoosora.common.except;

import com.yoosora.common.mode.IError;

public class CustomerException extends RuntimeException {
	private static final long serialVersionUID = 2564877818447447237L;
	private Object errcode;
	private String errmsg;

	public CustomerException(Object errcode, String errmsg) {
		super(errmsg);
		this.errcode = errcode;
		this.errmsg = errmsg;
	}

	public CustomerException(IError<?> error) {
		super(error.errmsg());
		this.errcode = error.errcode();
		this.errmsg = error.errmsg();
	}

	public Object getErrcode() {
		return this.errcode;
	}

	public String getErrmsg() {
		return this.errmsg;
	}
}
